define(function (require, exports, module) {
    "require:nomunge,exports:nomunge,module:nomunge";

    var app = require('mokit/app');
    var UCenterView = require('../views/ucenter-schedule');
    var commonUtils = require('../common/utils');
    var Uschedule = require('../models/Uschedule');

    /**
	 * 社友录页面控制器
	 */
    return app.controller.create({
        isSetting: true,
        /**
		 * 默认action
		 */
        index: function (context) {
            var self = this;
            Uschedule.getList(function(){
            	self.setView(new UCenterView({
            		model: Uschedule
            	}));            	
            });

        },
        //新建日程
         addSchedule: function(context) {
            var self = this;
            context.view.updateModel();
            Uschedule.item.scheduleTime = commonUtils.date_format(new Date(), "yyyy-M-d h:mm:ss");
            console.log(Uschedule.item);
            Uschedule.addItem(function(){
            	alert("添加成功")
            });
        },
        createSchedule: function(context) {
            var self = this;
        }
    });

});